<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>CourseInfo</title>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="/webjars/bootstrap/3.3.5/css/bootstrap.min.css" />
    <script src="/webjars/jquery/3.1.1/jquery.min.js"></script>
    <script src="/webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>


<body>

<h1 align="center">学生信息</h1>
<hr><br><br>

<table class="table table-bordered  table-striped table-hover table-condensed">
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>年龄</th>
        <th>专业</th>
        <th>操作</th>
    </tr>
    <!--遍历存放在map集合中的课程信息-->
    <tr th:each="student:${student}">
        <th th:text="${student.getSno()}"></th>
        <th th:text="${student.getSname()}"></th>
        <th th:if="${student.getSsex()}">男</th>
        <th th:unless="${student.getSsex()}">女</th>
        <th th:text="${student.getSage()}"></th>
        <th th:text="${student.getSdept()}"></th>
        <th><a th:href="@{/queryStudentById(id=${student.getSno()})}">更新</a></th>

    </tr>
</table>

<a class="btn btn-danger" th:href="@{/insert}" >插入课程</a><br/><br/>
<a class="btn btn-info" th:href="@{/selecttwo}" >根据姓和性别查找学生</a><br/><br/>
<a class="btn btn-primary" th:href="@{/courseinfo}">查看课程信息</a><br/><br/>
<a class="btn btn-success" th:href="@{/selectavg2}" >查看每门课程的平均成绩</a><br/><br/>
<a class="btn btn-warning" th:href="@{/studentandcourse}">查看学生和选修课程</a>
</body>
</html>